package gwtappcontainer.client.mydetails;

import gwtappcontainer.client.IPresenter;

import java.util.ArrayList;
import java.util.Collections;

import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;

class MyDetailsPresenter implements IPresenter {		
	
	interface IView {
		Widget asWidget();
	}
	
	private IView view;
	
	MyDetailsPresenter(IView view) {
		this.view = view;
		bind();
	}
	
	 
	private void bind() {
		//nothing to bind		
	}

	@Override
	public void render(HasWidgets container) {
		container.clear();
		container.add(view.asWidget());		
	}

	@Override
	public String getAppName() {		
		return "my details";
	}
	
	ArrayList<String> getAllProgramNames() {
		ArrayList<String> allPrograms = new ArrayList<String>();
		allPrograms.add("Isha Kriya");
		allPrograms.add("Inner Engineering Online");
		allPrograms.add("Inner Engineering (7 day)");
		allPrograms.add("Inner Way");
		allPrograms.add("Bhava Spandana");
		allPrograms.add("Samyama");
		
		Collections.sort(allPrograms);
		return allPrograms;
	}
}
